package com.cssl.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 上机订单表
 * @TableName order
 */
@TableName(value ="orderform")
@Data
public class OrderForm implements Serializable {
    /**
     * 消费订单
     */
    @TableId
    private String order_id;

    /**
     * 账户
     */
    private Integer number;

    /**
     * 开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime start_time;

    /**
     * 结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime end_time;

    /**
     * 网费
     */
    private BigDecimal internet_price;

    /**
     * 座位编号（外键）
     */
    private Integer eq_id;

    /**
     * 状态 （0.上机状态 1.下机状态）
     */
    private Integer state;

    /**
     * 说明
     */
    private String text;

    /**
     * 优惠编号
     */
    private Integer favorable_id;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public OrderForm() {
    }

    //上机
    public OrderForm(String order_id, Integer number, LocalDateTime start_time, Integer favorable_id, Integer eq_id, Integer state) {
        this.order_id = order_id;
        this.number = number;
        this.start_time = start_time;
        this.favorable_id = favorable_id;
        this.eq_id = eq_id;
        this.state = state;
    }

    //下机
    public OrderForm(String order_id, LocalDateTime end_time, BigDecimal internet_price, String text, Integer favorable_id, Integer state) {
        this.order_id = order_id;
        this.end_time = end_time;
        this.internet_price = internet_price;
        this.text = text;
        this.favorable_id = favorable_id;
        this.state = state;
    }
}